# 编写一个函数，输入n为偶数时，调用函数求1/2+1/4+...+1/n,当输入n为奇数时，调用函数1/1+1/3+...+1/n

#!/usr/bin/python
# -*- coding: UTF-8 -*-
 
if __name__ == '__main__':
    n = int(input('input a number:\n'))
    sum = 0
    while (n > 0):
        sum += 1/n
        n -= 2
    print (sum)